From e4d55e75e037452cc4ef7bfcdbae182d7f6a004d Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 13 Feb 2004 00:31:19 +0000 Subject: [PATCH] Don't draw bevels around active, RELIEF_NONE buttons that aren't Fri Feb 13 01:31:44 2004 Matthias Clasen * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around active, RELIEF_NONE buttons that aren't depressed. This improves the appearance of buttons in notebook tabs. (#109213, reported by Benjamin Otte, patch by Rodney Dawes) --- ChangeLog | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkbutton.c | 5 ++--- 6 files changed, 37 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7636211d62..5dff674309 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Feb 13 01:31:44 2004 Matthias Clasen + + * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around + active, RELIEF_NONE buttons that aren't depressed. This improves + the appearance of buttons in notebook tabs. (#109213, reported + by Benjamin Otte, patch by Rodney Dawes) + Fri Feb 13 01:06:08 2004 Matthias Clasen * demos/gtk-demo/main.c (read_line): Protect getc_unlocked() by diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7636211d62..5dff674309 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Fri Feb 13 01:31:44 2004 Matthias Clasen + + * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around + active, RELIEF_NONE buttons that aren't depressed. This improves + the appearance of buttons in notebook tabs. (#109213, reported + by Benjamin Otte, patch by Rodney Dawes) + Fri Feb 13 01:06:08 2004 Matthias Clasen * demos/gtk-demo/main.c (read_line): Protect getc_unlocked() by diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7636211d62..5dff674309 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Fri Feb 13 01:31:44 2004 Matthias Clasen + + * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around + active, RELIEF_NONE buttons that aren't depressed. This improves + the appearance of buttons in notebook tabs. (#109213, reported + by Benjamin Otte, patch by Rodney Dawes) + Fri Feb 13 01:06:08 2004 Matthias Clasen * demos/gtk-demo/main.c (read_line): Protect getc_unlocked() by diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7636211d62..5dff674309 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Fri Feb 13 01:31:44 2004 Matthias Clasen + + * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around + active, RELIEF_NONE buttons that aren't depressed. This improves + the appearance of buttons in notebook tabs. (#109213, reported + by Benjamin Otte, patch by Rodney Dawes) + Fri Feb 13 01:06:08 2004 Matthias Clasen * demos/gtk-demo/main.c (read_line): Protect getc_unlocked() by diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7636211d62..5dff674309 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Fri Feb 13 01:31:44 2004 Matthias Clasen + + * gtk/gtkbutton.c (_gtk_button_paint): Don't draw bevels around + active, RELIEF_NONE buttons that aren't depressed. This improves + the appearance of buttons in notebook tabs. (#109213, reported + by Benjamin Otte, patch by Rodney Dawes) + Fri Feb 13 01:06:08 2004 Matthias Clasen * demos/gtk-demo/main.c (read_line): Protect getc_unlocked() by diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 89725ce473..c47b453ef3 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -997,9 +997,8 @@ _gtk_button_paint (GtkButton *button, height -= 2 * (focus_width + focus_pad); } - if ((button->relief != GTK_RELIEF_NONE) || - ((GTK_WIDGET_STATE(widget) != GTK_STATE_NORMAL) && - (GTK_WIDGET_STATE(widget) != GTK_STATE_INSENSITIVE))) + if (button->relief != GTK_RELIEF_NONE || button->depressed || + GTK_WIDGET_STATE(widget) == GTK_STATE_PRELIGHT) gtk_paint_box (widget->style, widget->window, state_type, shadow_type, area, widget, "button", -- 2.30.2